"""settings模块"""
import sys ,os
from datetime import timedelta
from dotenv import load_dotenv
load_dotenv()

POSTGRESQL_USER=os.getenv('POSTGRESQL_USER',"postgres")
POSTGRESQL_PASSWORD=os.getenv('POSTGRESQL_PASSWORD',"postgres")
POSTGRESQL_HOST=os.getenv('POSTGRESQL_HOST',"127.0.0.1")
POSTGRESQL_PORT=os.getenv('POSTGRESQL_PORT',"5432")
POSTGRESQL_DB=os.getenv('POSTGRESQL_DATABASE',"postgres")


DB_URL=f"postgresql+asyncpg://{POSTGRESQL_USER}:{POSTGRESQL_PASSWORD}@{POSTGRESQL_HOST}:{POSTGRESQL_PORT}/{POSTGRESQL_DB}"

JWT_SECRET_KEY=os.getenv('JWT_SECRET_KEY',"a_secure_secret_key_for_testing_123456789")
JWT_ACCESS_TOKEN_EXPIRES=timedelta(seconds=int(os.getenv('JWT_ACCESS_TOKEN_EXPIRES','3600')))
JWT_REFRESH_TOKEN_EXPIRES=timedelta(seconds=int(os.getenv('JWT_REFRESH_TOKEN_EXPIRES','604800')))

ALIPAY_APP_ID=os.getenv('ALIPAY_APP_ID',"9021000135655454")
ALIPAY_NOTIFY_URL=os.getenv('ALIPAY_NOTIFY_URL',"your_notify_url")
ALIPAY_CALLBACK_URL=os.getenv('ALIPAY_CALLBACK_URL',"your_callback_url")